package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallUserCoupon;
import com.appkubes.mall.core.po.MallUserCouponExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallUserCouponMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserCouponSqlProvider.class, method="countByExample")
    long countByExample(MallUserCouponExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallUserCouponSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallUserCouponExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_user_coupon",
        "where usercoupon_key = #{usercouponKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String usercouponKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_user_coupon (usercoupon_key, app_key, ",
        "user_key, coupon_key, ",
        "create_time, end_time, ",
        "`state`, use_time, ",
        "`name`, money, use_money, ",
        "update_time, begin_time, ",
        "goods_key, version, ",
        "info)",
        "values (#{usercouponKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{userKey,jdbcType=VARCHAR}, #{couponKey,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=INTEGER}, #{endTime,jdbcType=INTEGER}, ",
        "#{state,jdbcType=INTEGER}, #{useTime,jdbcType=INTEGER}, ",
        "#{name,jdbcType=VARCHAR}, #{money,jdbcType=DECIMAL}, #{useMoney,jdbcType=DECIMAL}, ",
        "#{updateTime,jdbcType=INTEGER}, #{beginTime,jdbcType=INTEGER}, ",
        "#{goodsKey,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER}, ",
        "#{info,jdbcType=LONGVARCHAR})"
    })
    int insert(MallUserCoupon record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallUserCouponSqlProvider.class, method="insertSelective")
    int insertSelective(MallUserCoupon record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserCouponSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="usercoupon_key", property="usercouponKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="coupon_key", property="couponKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="end_time", property="endTime", jdbcType=JdbcType.INTEGER),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="use_time", property="useTime", jdbcType=JdbcType.INTEGER),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="money", property="money", jdbcType=JdbcType.DECIMAL),
        @Result(column="use_money", property="useMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="begin_time", property="beginTime", jdbcType=JdbcType.INTEGER),
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="info", property="info", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<MallUserCoupon> selectByExampleWithBLOBsWithRowbounds(MallUserCouponExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserCouponSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="usercoupon_key", property="usercouponKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="coupon_key", property="couponKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="end_time", property="endTime", jdbcType=JdbcType.INTEGER),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="use_time", property="useTime", jdbcType=JdbcType.INTEGER),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="money", property="money", jdbcType=JdbcType.DECIMAL),
        @Result(column="use_money", property="useMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="begin_time", property="beginTime", jdbcType=JdbcType.INTEGER),
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="info", property="info", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<MallUserCoupon> selectByExampleWithBLOBs(MallUserCouponExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserCouponSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="usercoupon_key", property="usercouponKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="coupon_key", property="couponKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="end_time", property="endTime", jdbcType=JdbcType.INTEGER),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="use_time", property="useTime", jdbcType=JdbcType.INTEGER),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="money", property="money", jdbcType=JdbcType.DECIMAL),
        @Result(column="use_money", property="useMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="begin_time", property="beginTime", jdbcType=JdbcType.INTEGER),
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallUserCoupon> selectByExampleWithRowbounds(MallUserCouponExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUserCouponSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="usercoupon_key", property="usercouponKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="coupon_key", property="couponKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="end_time", property="endTime", jdbcType=JdbcType.INTEGER),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="use_time", property="useTime", jdbcType=JdbcType.INTEGER),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="money", property="money", jdbcType=JdbcType.DECIMAL),
        @Result(column="use_money", property="useMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="begin_time", property="beginTime", jdbcType=JdbcType.INTEGER),
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallUserCoupon> selectByExample(MallUserCouponExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "usercoupon_key, app_key, user_key, coupon_key, create_time, end_time, `state`, ",
        "use_time, `name`, money, use_money, update_time, begin_time, goods_key, version, ",
        "info",
        "from mall_user_coupon",
        "where usercoupon_key = #{usercouponKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="usercoupon_key", property="usercouponKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="coupon_key", property="couponKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="end_time", property="endTime", jdbcType=JdbcType.INTEGER),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="use_time", property="useTime", jdbcType=JdbcType.INTEGER),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="money", property="money", jdbcType=JdbcType.DECIMAL),
        @Result(column="use_money", property="useMoney", jdbcType=JdbcType.DECIMAL),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="begin_time", property="beginTime", jdbcType=JdbcType.INTEGER),
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="info", property="info", jdbcType=JdbcType.LONGVARCHAR)
    })
    MallUserCoupon selectByPrimaryKey(String usercouponKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserCouponSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallUserCoupon record, @Param("example") MallUserCouponExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserCouponSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") MallUserCoupon record, @Param("example") MallUserCouponExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserCouponSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallUserCoupon record, @Param("example") MallUserCouponExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUserCouponSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallUserCoupon record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @Update({
        "update mall_user_coupon",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "user_key = #{userKey,jdbcType=VARCHAR},",
          "coupon_key = #{couponKey,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "end_time = #{endTime,jdbcType=INTEGER},",
          "`state` = #{state,jdbcType=INTEGER},",
          "use_time = #{useTime,jdbcType=INTEGER},",
          "`name` = #{name,jdbcType=VARCHAR},",
          "money = #{money,jdbcType=DECIMAL},",
          "use_money = #{useMoney,jdbcType=DECIMAL},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "begin_time = #{beginTime,jdbcType=INTEGER},",
          "goods_key = #{goodsKey,jdbcType=VARCHAR},",
          "version = #{version,jdbcType=INTEGER},",
          "info = #{info,jdbcType=LONGVARCHAR}",
        "where usercoupon_key = #{usercouponKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKeyWithBLOBs(MallUserCoupon record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_user_coupon
     *
     * @mbg.generated
     */
    @Update({
        "update mall_user_coupon",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "user_key = #{userKey,jdbcType=VARCHAR},",
          "coupon_key = #{couponKey,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "end_time = #{endTime,jdbcType=INTEGER},",
          "`state` = #{state,jdbcType=INTEGER},",
          "use_time = #{useTime,jdbcType=INTEGER},",
          "`name` = #{name,jdbcType=VARCHAR},",
          "money = #{money,jdbcType=DECIMAL},",
          "use_money = #{useMoney,jdbcType=DECIMAL},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "begin_time = #{beginTime,jdbcType=INTEGER},",
          "goods_key = #{goodsKey,jdbcType=VARCHAR},",
          "version = #{version,jdbcType=INTEGER}",
        "where usercoupon_key = #{usercouponKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallUserCoupon record);
}